home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / vir_real / faq / rsrch / nasa2 < prev    next >
Encoding:
Internet Message Format  |  1992-03-22  |  29.6 KB

  1. From rick@eos.arc.nasa.gov Wed Nov 28 18:58:04 1990
  2. Received: from eos.arc.nasa.gov by milton.u.washington.edu
  3.     (5.61/UW-NDC Revision: 2.1 ) id AA02605; Wed, 28 Nov 90 18:57:57 -0800
  4. Received: Wed, 28 Nov 90 18:58:26 -0800 by eos.arc.nasa.gov (5.65/1.2)
  5. Date: Wed, 28 Nov 90 18:58:26 -0800
  6. From: Rick Jacoby <rick@eos.arc.nasa.gov>
  7. Message-Id: <9011290258.AA20410@eos.arc.nasa.gov>
  8. To: madsax@u.washington.edu
  9. Subject: Re:  Sci.virtual-worlds
  10. Status: RO
  11.  
  12. Software Development Overview        1
  13.  
  14.  
  15. Software Development Overview
  16. Rick Jacoby, Steve Bryson
  17. Sterling Software, 3/31/90
  18.  
  19. Table of Contents
  20.  
  21. Introduction
  22. Overview of Hardware and Software
  23.     System Diagram
  24.     Host Computers
  25.     Graphics Systems
  26.     I/O Device Communication
  27.     Trackers
  28.     Gloves
  29.     Audio Systems
  30.     Viewing Stations
  31.     Viewer Electronics
  32.     Gimbal Platform
  33.     Video Editing Workstation
  34. Software Simulation Framework
  35. Directory Structure
  36. Libvived
  37. Commands
  38. Calfiles
  39. Graphics and GOSAMR
  40. Interfaces and Conventions
  41.     Standard VIEW Options
  42.     Speech and Sound
  43.     Windows
  44.     Menus
  45.     Gestures
  46. Data Representations
  47.     Input
  48.         Glove
  49.         Tracker
  50.         Speech Recognition
  51.     Output
  52.         Window
  53.         Speech Synthesis
  54.         Audio Cues
  55. Documentation
  56. Designing a VIEW Application
  57.  
  58. Introduction
  59.  
  60.     This document is an overview of the VIEW software development 
  61. environment.  It is intended for people who will be writing software for 
  62. the virtual environment.  It gives both "hard" information, like directory 
  63. structures and program names, and "soft" information, like our 
  64. development philosophies.
  65.  
  66.     The VIEW (Virtual Interactive Environment Workstation) system is a 
  67. set of computer hardware and software and computer-controlled i/o sub-
  68. systems.  The purpose of the system is to place the user in an artificial, or 
  69. virtual, reality.  Although it is an artificial reality, it may be an enhanced 
  70. reality, with displays or other features not found in ordinary reality.  
  71. There is a graphics system that presents pre-defined, solid shaded objects 
  72. around the user.  There is an audio system that presents synthesized 
  73. speech, and modulated or constant tones that can be located in space.  The 
  74. user's head position is tracked and is used to control the viewpoint of the 
  75. graphics system.  The user's hand position is tracked and may be used by 
  76. the system.  The position of his fingers is also tracked and can be used to 
  77. signal the computer through gestures.  The user can also give voice 
  78. commands to the system.
  79.  
  80.     This document is an overview and the reader should refer to the 
  81. man pages and other documentation for a more complete description of 
  82. each item (see Documentation section below).
  83.  
  84. Overview of Hardware and Sub-systems
  85.  
  86.     Below is a schematic diagram of most of the VIEW hardware.  Absent 
  87. from the diagram is the boom and its viewer, the gimbal and its cameras, 
  88. and the video editing/mixing workstation.
  89.  
  90.                                                                   
  91.  
  92.  
  93.     The virtual environment hardware consists of a host computer and 
  94. many i/o sub-systems.  The following is an introduction to computers and 
  95. sub-systems.
  96.  
  97. Host Computers:
  98.     The host computer is an HP 9000/835 and has the network node 
  99. name "Sim".  Sim runs HP-UX, HP's version of UNIX.  Sim communicates 
  100. with the sub-systems in several ways; the HP backplane, parallel 
  101. communication (AFI card), and serially (RS-232).  The serial 
  102. communication can be done in two ways; though a MUX card or through an 
  103. Real-Time Interface (RTI) card.
  104.  
  105. Graphics Systems:
  106.     There are two graphics systems in the VIEW environment; the ISG 
  107. Technology's graphics system (ISG) and the HP Turbo SRX graphics system 
  108. (SRX).  The ISG is actually a stand-alone computer (Motorola 68020 based) 
  109. running UNIX, and has the network node name "Stim".  It has two drawing 
  110. channels (one for each eye).  Each channel has a drawing engine 
  111. (DEU/consisting of 16 TI 320c25's), a display processor (DPU/bit-slice 
  112. processor), and a frame buffer.  The frame buffer in use is 640 x 480 
  113. (although there is a 1K x 1K mode that has not been tested).  Sim and Stim 
  114. communicate over a parallel channel (AFI on Sim/DR-11W on Stim).
  115.  
  116.     There are two SRXs on Sim's bus; one for each eye.  The SRX frame 
  117. buffers are 1280 x 1024.  The ISG graphics are faster, but lower 
  118. resolutionQthe SRX graphics are higher resolution, but slower.
  119.  
  120. I/O Device Communication:
  121.     All other i/o devices communicate with Sim in a serial manner.  Both 
  122. the MUX cards and the RTI cards sit on the HP backplane.  The standard 
  123. MUX interface is probably the easiest to code, however the HP's MUX card 
  124. is not designed as a real-time interface (the ports are polled and this limits 
  125. a scenario's frame rate to about 11 Hz).  The two RTI cards are like 
  126. attached co-processors (they are based on an Intel 80c186 with 512 K-
  127. bytes of memory and run PSOS).  Each RTI has eight serial ports with 
  128. which to communicate with i/o devices.  Programs are down-loaded from 
  129. Sim to the RTIQone for each device with which to communicate, and a 
  130. main program to gather the device data and send it to Sim.
  131.  
  132.  
  133. Trackers:
  134.     There are three different six degree of freedom tracking devices; a 
  135. Polhemus tracker with a source and two sensors, an Ascension tracker 
  136. with a source and three sensors, and boom.  Both the Polhemus and the 
  137. Ascension are magnetic trackers; they work by having the source emit e-m 
  138. waves, and coils in the sensors receive the waves.  The devices then 
  139. compute and return the position and orientation of the sensors relative to 
  140. the source.  With two sensors, the Polhemus operates at 18 Hz and is fairly 
  141. accurate up to 4 feet from its source.  With three sensors, the Ascension 
  142. operates at 30 Hz and is fairly accurate up to 6 feet from its source.  They 
  143. are connected to one of the RTI cards and they are used for tracking head 
  144. and hand (glove) movement.
  145.  
  146.     The boom is used to support, and track the movement of, the boom-
  147. mounted viewer.  There are six potentiometers on the boom.  The 
  148. potentiometers analog values are converted to digital values on an STD 
  149. computer and the sent to an IBM AT which computes the position and 
  150. orientation of the viewer relative to the boom base.  The AT can 
  151. communicate with Sim via RS-232.
  152.  
  153. Gloves:
  154.     There are three VPL glove devices, each capable of reading one 
  155. glove; a Macintosh with glove software, and two stand-alone glove boxes.  
  156. All three are connected to an RTI.  The amount of finger joint flexion is 
  157. returned to Sim where the gesture software determines which of the 
  158. eleven gestures is being made.
  159.  
  160. Audio Systems:
  161.     The audio system consists of two MIDI driven Ensoniq (ESQ-M) 
  162. synthesizers, a Hinton box (RS-232 to MIDI converter), a Dectalk speech 
  163. synthesizer, a convolvotron, headphone and headphone amp, speakers and 
  164. speaker amp, and a audio mixer/patch bay.  Audio output is either audio 
  165. cues (discrete or continuous tones) or speech strings.  The output is played 
  166. through room speakers and/or headphones.  Audio cues can be convolved 
  167. (located in 3-space) or un-convolved.  Un-convolved cues are routed to the 
  168. second synthesizer and then to the mixer.  Convolved cues are routed to 
  169. the first synthesizer and then to the convolvotron.  The convolvotron 
  170. output should be routed to the mixer, but due to a convolvotron/mixer 
  171. signal matching problem, the convolvotron is currently patched around the 
  172. mixer and goes directly to the headphones.  The system is capable of 
  173. playing 8 un-convolved cues and 2 independently convolved cues at one 
  174. time.
  175.  
  176. Speech Recognition:
  177.     Speech recognition input is performed by a VocaLink speech 
  178. recognizer.  It is connected to an IBM PC which is connected to a MUX port.  
  179. The IBM is needed because it runs some VocaLink supplied software (the 
  180. source to which costs $7-8 K).  The VocaLink is capable of understanding 
  181. connected speech, however we are currently using it in a discrete time 
  182. mode.
  183.  
  184. Viewing Stations:
  185.     There are two viewing stations for the virtual environment; the 
  186. helmet and the boom-mounted viewer.  The helmet viewer consists of two 
  187. back-lit, monochromatic, liquid crystal displays with 320 x 220 resolution 
  188. and diamond shaped pixels.  (Due to the pixel shape, there is an effective 
  189. higher resolution of 640 x 220)  The color of the display is determined by 
  190. the color of the back lighting.  Tracking the head position and orientation is 
  191. done with one of the magnetic trackers.  The helmet also has earphones 
  192. (for audio output), and microphone (for speech input).
  193.  
  194.     The boom-mounted viewer consists of two black and white CRT's 
  195. with 400 x 400 resolution.  Tracking is done with the boom output (see 
  196. above).
  197.  
  198. Viewer Electronics:
  199.     The output of the SRX graphics is an RGB signal.  To make it useful 
  200. for the viewer, it is passed through the a scan converter where it is 
  201. converted to NTSC.  The output of the ISG is already NTSC. The NTSC signal 
  202. is sent to an electronics box (e-box) where it conditioned for the viewer 
  203. (sync signal changed, image positioned, etc.).  The final signal is sent from 
  204. the e-box to the viewer.
  205.  
  206. Gimbal Platform:
  207.     The gimbal platform is a remotely operated three degree of freedom 
  208. pointing device.  It has two video cameras mounted on the gimbal for 
  209. stereo video input into the VIEW environment.  The gimbal is connected to 
  210. an IBM AT (the same AT to which the boom is connected).  Sending 
  211. orientation data from the boom to the gimbal can then control where the 
  212. cameras are looking.  The Polhemus can also be connected to the AT so the 
  213. helmet's orientation can be made to control the gimbal's orientation.
  214.  
  215. Video Editing Workstation:
  216.     Output from both the audio mixer and the viewer electronics boxes is 
  217. routed in parallel to the user (viewer, earphones, and speakers) and to the 
  218. video editing and mixing workstation.  Routing to the workstation allows 
  219. video documentation of research, demonstrations, and of the system.
  220.  
  221. See the Documentation section below for details on where to look for more 
  222. information on most of these topics.
  223.  
  224. Software Simulation Framework
  225.  
  226.     A skeletal application, skel, was developed as an implementation of 
  227. the software simulation framework.  Skel is a simple program that uses 
  228. most of the VIEW i/o devices and many of the VIEW library functions.  
  229. The skeletal application (or simulation framework) has two purposes:  it 
  230. can be a starting point for new application programs, and it is an example 
  231. of how to access many of the VIEW devices. 
  232.  
  233.     Skel is a running program and code could be added and modified so 
  234. that a new application is developed from this software 'framework'.
  235.  
  236.     Skel uses the viewio i/o system (RTI), gloves and tracker input, 
  237. gesture recognition, speech input, audio output (convolved and un-
  238. convolved), speech synthesizer output, and graphics output using .g files, 
  239. windows, menus, and text.
  240.  
  241.     Skel uses standard view options (SVO), so the user can select 
  242. graphics output device, glove and tracker input devices, and user 
  243. calibration files, all at run time.
  244.  
  245.     For more information see the SVO man page and the section of this 
  246. document "Designing a VIEW Application".
  247.  
  248. Directory Structure
  249.  
  250.     Most of the VIEW developed software is kept in directories under 
  251. /usr/vived directory.  The major categories of sub-directories are: source 
  252. files, include files, executable utilities, VIEW library, user data, demos, and 
  253. experimental work.  Most of the source files are backed-up in the same 
  254. directory as RCS files (,v files).
  255.  
  256.     The following is a list of most of the directories and there intended 
  257. use.
  258.  
  259. /usr/vived/src/lib/libvived        .c files for libvived.a
  260. /usr/vived/src/lib/libvived/gosamr    .c files for GOSAMR portion of
  261.                             libvived.a
  262. /usr/vived/src/lib/cal    device dependent source for cal file creation
  263. /usr/vived/src/lib/ins    source for install script
  264. /usr/vived/src/cmd        source for utilities
  265. /usr/vived/src/cmd/mkcal    source for mkcal
  266. /usr/vived/src/include    source for .h files used in libvived.a and
  267.                     application programs
  268. /usr/vived/src/man    sub-directories for sources for man pages
  269. /usr/vived/src/misc    sub-directories for interesting and useful
  270.                 non-standard code
  271. /usr/vived/src/misc/external-eye    window.c that creates one external
  272.                             viewpoint and one internal
  273.                             viewpoint in an application
  274. /usr/vived/src/rti/blocking        source for RTI code where rtimain does
  275.                         a blocking write
  276. /usr/vived/src/rti/non-blocking    source for RTI code where rtimain does
  277.                         a non-blocking write
  278. /usr/vived/src/rtihost        source for host side of RTI
  279.  
  280. /usr/vived/bin    executable utilities
  281.  
  282. /usr/vived/exp    sub-directories of user code under development
  283.  
  284. /usr/vived/include    installed .h files used in libvived.a and application
  285.                 programs
  286.  
  287. /usr/vived/lib            installed libvived.a, installed cal files,
  288.                     installed install script
  289. /usr/vived/lib/userdata    sub-directories for each users glove and
  290.                     convolvotron calibration files
  291. /usr/vived/lib/gdata        GOSAMR file for the installed hand
  292. /usr/vived/lib/rti        executable RTI code
  293. /usr/vived/lib/rtihost    executable for host side of RTI
  294.  
  295. /usr/vived/doc            ACE documentation
  296.  
  297. /usr/vived/demo            installed demos
  298. /usr/vived/demo/...data        data files for demos
  299. /usr/vived/demo/...data/code    user source code for installed demos
  300.  
  301. Libvived
  302.  
  303.     The VIEW software engineers have developed an extensive library of 
  304. user-callable functions which can be used to build a scenario.  The installed 
  305. version of the library is located in /usr/vived/lib.  These functions are 
  306. written in C for the most part, although YACC and LEX are used in parsing 
  307. the graphics files.  There are over 60 C files in /usr/vived/src/lib/libvived 
  308. and /usr/vived/src/lib/libvived/gosamr that make up the libvived.a 
  309. library.  The corresponding sources for the include files are in 
  310. /usr/vived/src/include and the installed include files are in 
  311. /usr/vived/include.  The RCS version of the source files are in the same 
  312. directory as the sources.
  313.  
  314. Commands
  315.  
  316.     There are nine utilities in /usr/vived/bin.  The sources for these 
  317. utilities are in /usr/vived/src/cmd.  The following is a list of utilities and 
  318. their use.
  319.  
  320. ace            edit and test of audio cues and patches
  321. boomtest        test and calibrate boom
  322. glovecalib        calibrate glove
  323. glovetest        test and calibrate glove
  324. mkcal        make calibration (cal) files
  325. qtext        makes a text listing of a cue file
  326. spsyntest        test the Dectalk speech synthesizer
  327. tracktest        test the magnetic trackers
  328. vocatest        test the VocaLink speech recognizer
  329. vpsize        test resolution, contrast, and brightness of video display
  330.             device
  331.  
  332. Calfiles
  333.  
  334.     Cal files provide a way of changing i/o device parameters and 
  335. characteristics (like which port its connected to, and baud rate, etc.) 
  336. without having to recompile the application software.  The application 
  337. software specifies the cal file to use and the device initialization software 
  338. reads the file and acts accordingly.  If characteristics are changed, the cal 
  339. file needs to be recompiled but the application programs need not be.
  340.  
  341.     Cal files were developed when all i/o was done on the MUXes.  Cal 
  342. files are not being used for the RTI i/o.
  343.  
  344.     The source files that specify the device characteristics are in 
  345. /usr/vived/src/lib/cal.  The installed cal files are in /usr/vived/include. 
  346.  
  347. Graphics and GOSAMR
  348.  
  349.     Every graphics engine has its own native graphics language.  
  350. GOSAMR (Graphic Object Specification, Manipulation, and Rendering 
  351. functions) is meant to be a device independent way of specifying graphics 
  352. objects and their transformation.  GOSAMR borrows a lot of its concepts 
  353. and terminology from PHIGS (programmers hierarchical interactive 
  354. graphics systems).
  355.  
  356.     GOSAMR allows the ASCII representation of objects and their 
  357. characteristics and transformations.  Objects are made of points, lines, 
  358. polygons, and sub-objects. Characteristics include luminance and visibility.  
  359. Transformations include scale, rotation, and translation.  Characteristics 
  360. and transformations can be changed in real-time.  Objects, their 
  361. characteristic, and their transformations, are defined in text files.  These 
  362. files are read by the GOSAMR software in an application and turned into 
  363. graphic objects and rendered.
  364.  
  365.     Graphics objects are arranged in hierarchies called "structure 
  366. networks" or trees.  On the SRX graphics, the tree is called a display list.  
  367. On the ISG, the tree is a collection of ISG objects (which behave differently 
  368. than a display list).  User defined labels allow the user to access the 
  369. transformations and characteristics in the tree and modify them during 
  370. program execution.
  371.  
  372.     There are three phases of drawing an object.  The first is object 
  373. creation when the ASCII files are read and the trees are created.  The 
  374. second is compilation when changed transformations or 
  375. characteristics are put into the trees.  The third is traversal when the 
  376. tree is "walked" and the graphic objects are rendered.
  377.  
  378.     The first phase is executed once (usually) at the beginning of a 
  379. program.  Phases two and three are executed (usually) once per 
  380. frame.  The first phase, when the trees are created, is device 
  381. independent.
  382.  
  383.     If the graphics machine is the SRXs, phase two modifies the 
  384. tree, and creates or modifies the display lists, and phase three 
  385. renders the display list.
  386.  
  387.     If the graphics machine is the ISG, phase two modifies the tree, 
  388. and creates the ISG objects if they are not already created.  The 
  389. objects are both modified and rendered in phase three.
  390.  
  391.     There are two noteworthy features of GOSAMR; traversal 
  392. control, and escapes.  Traversal control can allow tree normal 
  393. traversal, return back up the tree without walking any part of the 
  394. tree below, or continued traversal with invisibility (i.e. do the 
  395. transformations below but do not show the graphics until visibility is 
  396. again turned on).
  397.  
  398.     Escapes allow the calling of a user-specified function from 
  399. down in the graphics tree.  This is useful for retrieving 
  400. transformation matrices of (usually invisible) objects and then using 
  401. the matrices for collision detection calculations between objects.
  402.  
  403.     The VIEW system provides window functions that, when passed a 
  404. GOSAMR structure, will draw the graphics objects in a 3-d window, once 
  405. for each eye.  Window parameters such as perspective matrix, field of 
  406. view, inter-pupillary distance, etc. are part of the windowing structure and 
  407. can be accessed or modified by the programmer.  The window functions 
  408. also allow you to draw windows inside of other windows.
  409.  
  410.     The VIEW system also provides easy to use menu creation and 
  411. interaction functions.  Menu parameters such as number of columns, action 
  412. upon selection, whether the menu goes away upon selection, etc. can be 
  413. easily changed by the programmer.  The menu software creates a GOSAMR 
  414. graphics objects from the data you pass.
  415.  
  416. Interfaces and Conventions
  417.  
  418.     VIEW software conventions and program interface conventions are 
  419. evolving as the VIEW environment is developed.  Several of these 
  420. conventions are described below.
  421.  
  422. Standard VIEW Options (SVO):
  423.     Standard VIEW Options software provide an easy to use, standard 
  424. interface for VIEW programs.  The software is based on a data structure 
  425. (svodata) that is initialized (and optionally modified) by the programmer, 
  426. and may be interrogated and/or modified by the user at run-time.  Options 
  427. that can be set or changed are choice of graphics engine, glove calibration 
  428. file, convolvotron calibration file, right and left glove devices, and head, 
  429. left and right tracking devices.
  430.  
  431. Speech and Sound:
  432.     All speech and sound output are triggered via the event mechanism 
  433. to assure that all sound outputs are handled consistently.  There are 
  434. currently no conventions for speech input and output.  Use is defined for 
  435. each application.
  436.  
  437. Windows:
  438.     All graphic output is rendered into an overlapping window system.  
  439. The window system creates a stereo pair of images; one half the pair for 
  440. each eye.  Each half of the stereo pair rendered from a slightly different 
  441. viewpoint.  The viewpoints are separated by the inter-pupillary distance 
  442. of an 'average' person.  Several overlapping windows may be defined with 
  443. different graphics in each.  Windows may occlude other windows or may 
  444. be transparent.
  445.  
  446. Menus:
  447.     The user may create a menu.  The menu then exists in the VIEW 
  448. database as a three dimensional object.  The user can move this menu and 
  449. select objects via VIEW library menu calls.  The moving and selection are 
  450. usually done via gestures.  The user assigns a function to each item in the 
  451. menu and when an item is selected the corresponding function is executed. 
  452.  
  453. Gestures:
  454.     There is a standard set of gestures predefined in the VIEW 
  455. environment.  The data returned from each glove can be passed to a VIEW 
  456. library routine.  This routine returns a value indicating the gesture being 
  457. made by that glove.  The user can then use this value to determine what 
  458. action should be taken by the application.
  459.  
  460. Data Representations:
  461.  
  462. INPUT
  463.  
  464. Glove:
  465.     The VIEW library routines that handle the glove input return, for 
  466. each glove, a struct which contains the joint angles for each measured 
  467. finger joint of the user's hand.  The angles are measured in radians, with 
  468. straight fingers returning zero.  The glove struct is defined as:
  469.  
  470. struct glove
  471. {
  472.     struct finger
  473.     {
  474.         float mpj;    /* joint where finger meets palm    */
  475.         float pipj;    /* middle joint of finger        */
  476.     } finger [5]        /* array of one for each finger    */
  477.  
  478.     float palm;        /* degree of bend of palm 
  479.                 NOT CURRENTLY SUPPORTED */
  480.  
  481.     float web[4];    /* contains abduction bend data
  482.                 NOT CURRENTLY SUPPORTED */
  483. }
  484.  
  485.     The order of the glove.finger array is THUMB, FOREFINGER, 
  486. MIDDLEFINGER, RINGFINGER, LITTLEFINGER (these values are defined in 
  487. glove.h).
  488.  
  489. Tracker:
  490.     There are two types of data received from the trackers, position and 
  491. orientation.  The position data is returned as a struct called vector3d, 
  492. defined as:
  493.  
  494. struct vector3d
  495. {
  496.     float x, y, z;
  497. }
  498.  
  499.     The position data is in a coordinate system with 0, 0, 0 on the floor 
  500. directly under the tracker source.  Positive x is forward (the direction the 
  501. tracker source is pointing), positive y is to the right (when facing forward), 
  502. and positive z is up.  The units of position measurement are meters.
  503.  
  504.     There are three data formats for receiving orientation from the 
  505. trackers: quaternion, matrix and euler.  The user chooses to receive one of 
  506. these formats by using the appropriate call from the VIEW library.  The 
  507. orientation is defined relative to the coordinate system defined above.
  508.  
  509.     When the orientation data is received as a quaternion, the data is 
  510. returned in a struct defined as:
  511.  
  512. struct quaternion
  513. {
  514.     float w, x, y, z;
  515. }
  516.  
  517.     An axis for rotation is defined by the origin and x, y, and z values.  
  518. The angle of rotation about that axis is arccosine(2w).  It is sufficient in 
  519. normal use of the VIEW environment to pass the quaternion values to the 
  520. animation and window routines without worrying too much about their 
  521. significance.
  522.  
  523.     When the orientation is returned as a Matrix, the data is returned in 
  524. a data type Matrix, defined as:
  525.  
  526. typedef float Matrix[4][4];
  527.  
  528.     The upper left 3x3 corner of this matrix contains a normalized 
  529. rotation matrix, and the 4, 4 element is 1.0.  All other elements are 0.0.
  530.  
  531.     When the orientation is returned as a set of euler angles, the data is 
  532. returned as a vector3d (see above), with the x field = roll, y field = pitch, 
  533. and z field = yaw.
  534.  
  535. Speech Recognition:
  536.     The output from the speech recognition system is returned as a 
  537. pointer to an ASCII string.  This string contains the last single word 
  538. recognized by the speech recognition system.
  539.  
  540. OUTPUT
  541.  
  542. Windows:
  543.     A window is defined by a struct.  The various fields of the struct 
  544. represent attributes of the window and they are initialized by the function 
  545. call that creates the window.  The user may access and modify fields of 
  546. this struct, both through various calls and/or directly.  Window position is 
  547. defined in terms of screen coordinates.  The position of a window is given 
  548. by a rectangle indicating the top left corner and bottom right corner of the 
  549. window on the screen.  The bottom left corner of the screen is (0.0, 0.0), 
  550. and the top right corner of the screen is (1.0, 1.0).
  551.  
  552. Speech Synthesis:
  553.     Speech output is initiated by passing a string to the speech 
  554. synthesizer.  There are currently no conventions for speech output.  Speech 
  555. output can also be accomplished using the audio cue system.
  556.  
  557. Audio Cues:
  558.     All audio data is defined via the user command "ace".  The ace 
  559. program creates a file of audio cues.  Each cue is accessed by a ASCII string 
  560. via the audio and event routines.
  561.  
  562. Documentation
  563.  
  564.     There are currently about 50 locally written man pages covering 
  565. various aspects of the VIEW software and hardware.  Listed below are 
  566. topics and a list of man pages (many of the man pages could actually be 
  567. listed under several topics).
  568.  
  569. glove:
  570.     glovecalib(1), glovetest(1), calgl(3), gesture(3), glove(3)
  571.  
  572. tracker:
  573.     tracktest(1), tracker(3)
  574.  
  575. audio & events:
  576.     qtext(1), spsyntest(1), audio(3), event(3), qtimeout(3), spsyn(3)
  577.  
  578. graphics:
  579.     vpsize(1), drawgs(3), drawstr(3), gedep(3), getgs(3), getlabgse(3),
  580.     ghand(3), gosamr(3), loadgfile(3), menu(3), setgseval(3), viewer(3),
  581.     window(3), AFI(3), ISG(3)
  582.  
  583. speech input:
  584.     vocatest(1), voca(3)
  585.  
  586. scenarios:
  587.     tele(1), skel(1)
  588.  
  589. math, matrices, quaternions:
  590.     fastmath(3), fxform(3), finvrmat(3), mattotrs(3), mattoxform(3),
  591.     quaternion(3), vector3d(3), matrix(3), misc(3), viewmath(3)
  592.  
  593. miscellaneous i/o:
  594.     getcal(3), kybd(3), svo(3), viewio(3)
  595.  
  596. boom:
  597.     boom(3), boomcheck(3)
  598.  
  599.     A hardcopy version of the locally-written man pages are available in 
  600. the Man Page notebook.
  601.  
  602.     Some non-locally written man pages that may be of interest are: 
  603. rcs(1), rtiintro(3t), and starbase (3g).
  604.  
  605.     Other locally written documents that may be of interest are: Virtual 
  606. Interactive Environment Workstation Notebook ("white binder"), VIVED 
  607. System Documentation, Virtual Visual Environment Display System "Quick 
  608. Look" User's Guide, Remote Camera System Document, 1989 SIGGRAPH 
  609. Tutorial Notes, Audio Cue Editor (ACE) User's Manual, VocaLink-VIEW's 
  610. Voice Recognition System, and README files in /usr/vived/demo and its 
  611. sub-directories.
  612.  
  613.     Also of interest is the video document "VIEW: The Ames Virtual 
  614. Workstation".
  615.  
  616. Designing a VIEW application:
  617.  
  618. A typical VIEW application contains several interconnected elements.  This 
  619. section describes those elements and how they communicate.  The relevant 
  620. call for each step is given in parenthesis.  See the source code for the 
  621. skeleton application, or the skel man page, for a specific example.
  622.  
  623. Overview:
  624.     The basic VIEW application uses input from the trackers and gloves, 
  625. and outputs graphics to a stereo viewer.  Additional features may include 
  626. speech input, speech and audio output, menus, and windows in addition to 
  627. the main window.  Topics not covered here include use of the 
  628. convolvotron, and special (non-GOSAMR) graphics.
  629.  
  630. Initialization:
  631.     Initialization of the VIEW environment is still somewhat finicky.  
  632. First initialize the user defaults via the svo structure (initsvo).  The fields 
  633. of the svo structure should be used when initializing all I/O devices.  The 
  634. viewio structure should then be initialized (initviewio), which sets up the 
  635. RTI serial communications with various devices.  The I/O devices are then 
  636. individually initialized (inittracker, for example).  If audio input and 
  637. output is used, the audio and speech devices should be initialized 
  638. (initaudio, initspsyn, and initvoca).  Then the graphics windows should be 
  639. initialized (initwindows) and defined (makewindow).  Remember that one 
  640. window creates the stereo pair for both eyes.  Any other windows should 
  641. be defined also at this time.  The user should then load all GOSAMR graphic 
  642. data (loadgfile) and initialize the graphic hand (initghand).  Any menus to 
  643. be used should be defined at this time (initmenus and initmenu).  If the 
  644. user wishes to use UNIX system signal vectors, they should be defined 
  645. AFTER the windows are defined  (The window code uses signals for 
  646. parallel communication with the graphic computer).  After initialization, 
  647. the graphics should be compiled (compallgs), and all windows should be 
  648. drawn once (setupwindow) before the program loop is entered.  Finally, 
  649. hide any windows that should not be showing at the beginning of the 
  650. application (hidewindow). 
  651.  
  652. Program loop: 
  653.     The simplest VIEW application's program loop 1) collects data from 
  654. the trackers, 2) processes the data, 3) draws the graphics for this frame 
  655. and updates audio output (if any).
  656.  
  657. 1) Collect data:  First, get the data from the RTI system to the host 
  658. computer (getviewio).  Then collect the data for each device 
  659. (gettrackerq, getglove, etc.).  For the head tracker data, there is a special 
  660. call (trackheadq, for example) which returns the position of the center 
  661. of the head.  Also collect any speech data here (getvoca).  
  662.  
  663. 2) Process the data:  What happens here is largely up to the user.  The 
  664. only standard action in this phase is the animation of the graphic hand 
  665. (animghand) using the current glove and glove tracker data.  The user 
  666. may interpret the glove data via the gesture structure (gesture).  The 
  667. value returned from the gesture routine may then be used to initiate 
  668. some action such as picking up an object or triggering a sound event.  
  669. The user may pass the gesture and hand position to the menu structure 
  670. (posmenu and hitamenu) to trigger a menu action.  
  671.  
  672. 3) Draw graphics and update audio:  First make sure all windows that 
  673. the user wishes to display are visible (showwindow).  Then compile any 
  674. changes to the graphics (compallgs).  This must be done even though the 
  675. user may not have initiated any changes.  Call compallgs before any 
  676. drawing and DO NOT call compallgs more than once per loop.  Then 
  677. update all windows (setupwindow) with the graphic data for that 
  678. window and the current head tracker data.  Setupwindow must be 
  679. called for each graphic structure in that window.  Finally, cause the 
  680. actual graphic screen to be updated (drawwindows).  If the audio event 
  681. structure is used, the audio system should be updated (maintain_score).  
  682. If the convolvotron is being used, update the convolvotron's head 
  683. position (cv_newhead_q).
  684.  
  685. Exiting the program:
  686.     First close the individual I/O devices that are open (shutglove, 
  687. shuttracker, etc.).  Then shut down the RTI (closeviewio) and the graphics 
  688. (Rclose).  Finally, if the audio structure is used, close it (shutaudio).
  689.  
  690.